{% extends "base.html" %}
{% load i18n %}

{% block title %} {%trans "[TITLE] My classes"%} - Mr. Edu {%endblock%}

{% block section%}
	
	<h1>{%trans "[TITLE] My classes"%}</h1>
	
	{% if courses %}
	<table>
		<caption class="hidden">{% trans "[TABLE] Your classes: for each one, the table visualizes the name of the class, the number of students, the number of folders and the number of contents." %}</caption>
		<thead>
			<tr class="noBorder">
				<th>{% trans "Class"%}</th>
				<th><abbr title="{% trans "[TABLE] Number" %}">{% trans "[TABLE] No."%}</abbr> {% trans "[TABLE] of students"%}</th>
				<th><abbr title="{% trans "[TABLE] Number" %}">{% trans "[TABLE] No."%}</abbr> {% trans "[TABLE] of folders"%}</th>
				<th><abbr title="{% trans "[TABLE] Number" %}">{% trans "[TABLE] No."%}</abbr> {% trans "[TABLE] of contents"%}</th>
				<th class="noBg"></th>
			</tr>
		</thead>
		<tbody>
			{% for c in courses %}
			<tr>
				<td class="class"><a href="/mrEdu/{{userRole}}/class/{{c.id}}/">{{c.name}} {{c.year}}</a></td>
				<td>{{c.studentsNum}}</td>
				<td>{{c.collectionsNum}}</td>
				<td>{{c.contentsNum}}</td>
				<td class="noBg"><span class="button"><a href="/mrEdu/{{userRole}}/class/{{c.id}}/collection/new" title="{% trans "[TABLE] Create a new folder for" %} {{c.name}} {{c.year}}">{% trans "[BUTTON] New folder" %}</a></span></td>
			</tr>
			{% endfor %}
		</tbody>
	</table>
	{% else %}
	<div id="feedback">
		<p class="message">{% trans "[MESSAGE] You have not any class associated." %}</p>
	</div>
	{% endif %}
{%endblock%}
